import request from '@/utils/request.js'

export const queryAllEmpsApi =()=>{
    return request.get('/emps/list')
}
export const queryPageEmpsApi=(name,gender,begin,end,page,pageSize)=>{
    return request.get(`/emps?name=${name}&gender=${gender}&begin=${begin}&end=${end}&page=${page}&pageSize=${pageSize}`)
}
export const queryEmpByIdApi=(id)=>{
    return request.get(`/emps/${id}`)
}
export const addEmpApi=(emp)=>{
    return request.post('/emps',emp)
}

export const updateByIdApi=(emp )=>{
    return request.put('/emps',emp)
}
export const deleteByIDApi=(ids)=>{
    return request.delete(`/emps?ids=${ids}`)
}